package com.tul.exercise.base.subjectobserver;

/**
 * @author tul on 2018/7/22.
 */
public class main {

    public static void main(String[] args) {
        DataInfo data1 = new DataInfo(38.2, 36, 1000);
        DataInfo data2 = new DataInfo(96.2, 39, 1050);
        DataInfo data3 = new DataInfo(250.2, 36, 1600);

        WeatherData weatherData = new WeatherData();

        CurrentConditionDisplay currentConditionDisplay = new CurrentConditionDisplay(weatherData);
        StatisticDisplay statisticDisplay = new StatisticDisplay(weatherData);
        ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);

        weatherData.setData(data1);
        //currentConditionDisplay.display();
        //statisticDisplay.display();
        //forecastDisplay.display();

        weatherData.setData(data2);
        //currentConditionDisplay.display();
        //statisticDisplay.display();
        //forecastDisplay.display();


        weatherData.setData(data3);
        // currentConditionDisplay.display();
        //statisticDisplay.display();
        //forecastDisplay.display();
    }
}
